function savefig_fct(name,openfig)

name_pdf=[name '.pdf'];
set(gcf,'PaperPositionMode','manual');
set(gcf,'PaperUnits','centimeters');
set(gcf,'PaperType','A4');
set(gcf,'PaperPosition',[ 2 9 17 12]);

print('-dpdf',name_pdf);

if openfig ~=1
    close;
end

    %
